# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=pkgconf

pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.9.5
pkgrel=1
pkgdesc='pkg-config compatible utility which does not depend on glib'
url='https://github.com/nenolod/pkgconf'
arch=('any')
license=('ISC')
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc")
conflicts=("${MINGW_PACKAGE_PREFIX}-pkg-config")
provides=("${MINGW_PACKAGE_PREFIX}-pkg-config")
source=(http://files.etoilebsd.net/pkgconf/$_realname-$pkgver.tar.bz2)
sha256sums=('78dd81f5c0d89b65872bf887e9ee66927da1916796731a8d5183b43885e7029d')

build() {
    cd $_realname-$pkgver
    ./configure --prefix=${MINGW_PREFIX} \
      --build=${MINGW_CHOST} \
      --host=${MINGW_CHOST} \
      --target=${MINGW_CHOST} \
      --sysconfdir=${MINGW_PREFIX}/etc \
      --mandir=${MINGW_PREFIX}/share/man \
      --infodir=${MINGW_PREFIX}/share/info \
      --localstatedir=${MINGW_PREFIX}/var
    make
}

package() {
    cd $_realname-$pkgver
    make DESTDIR="$pkgdir" install
    cp "${pkgdir}${MINGW_PREFIX}"/bin/pkgconf "${pkgdir}${MINGW_PREFIX}"/bin/pkg-config
}

